﻿using System;
using OrchardFork.Framework.Data;
using OrchardForkTest.Model;

namespace OrchardForkTest.Dao
{
    public class TestDao : BaseDao, ITestDao
    {
        public void FinalTest()
        {
            // 带事务操作
            var userInfo = new UserInfo
            {
                UserName = "Dao事务入口：" + Guid.NewGuid().ToString("N"),
                Password = "测试密码",
                NickName = "测试昵称",
                Address = "测试地址"

            };
            userInfo.Save();

            //抛出错误，事务回滚测试
            throw new Exception();
        }

    }
}